//
//  CustomListCell.h
//
//  Created by lee jory on 09-10-22.
//  Copyright 2009 Netgen. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface CustomDataGridComponentDataSource : NSObject {
	NSMutableArray *titles; //标题列表
	NSMutableArray *data; //数据体，其中包函其它列表(NSArray)
	NSMutableArray *fieldTypes; //数据类型
	NSMutableArray *columnWidth; //列宽
}
@property(retain) NSMutableArray *titles;
@property(retain) NSMutableArray *data;
@property(retain) NSMutableArray *fieldTypes;
@property(retain) NSMutableArray *columnWidth;

@end



@interface CustomDataGridScrollView : UIScrollView {
	id customListCell;
	int index;
}
@property(assign)id customListCell;

@end



//数据列表组件，支持上下与左右滑动
@interface CustomListCell : UIView<UIScrollViewDelegate,UIActionSheetDelegate> {
	CustomDataGridScrollView *vLeft; //左下列视图
	CustomDataGridScrollView *vRight; //右下列视图
	UIView *vRightContent; //右下列表内容
	UIView *vLeftContent; //左下列表内容
	UIView *vTopRight; //右上标题
	
	CustomDataGridComponentDataSource *dataSource; //列表数据源
	float contentHeight; //内容总高度
	float contentWidth; //内容总宽度
	float cellHeight; //单元格默认高度
	float cellTitleHeight; //标题行高度
	float cellWidth; //单元格默认宽度
	
	
	//平台对象
	NSString *dataObjectName;
	NSString *layoutName;
	int page;
	NSMutableDictionary *listData;
	NSMutableDictionary *listLayout;
	NSString *gridType;
	int tabIndex;
	NSMutableArray *buttons;
	UIViewController *viewController;
    
    int actionSheetFlag;
}

@property (readonly) CustomDataGridScrollView *vRight;
@property (readonly) CustomDataGridScrollView *vLeft;
@property (readonly) float cellHeight;
@property (retain) CustomDataGridComponentDataSource *dataSource;
@property (nonatomic, retain) NSString *dataObjectName;
@property (nonatomic, retain) NSString *layoutName;
@property (nonatomic, retain) NSMutableDictionary *listData;
@property (nonatomic, retain) NSMutableDictionary *listLayout;
@property (nonatomic, retain) NSString *gridType;
@property (nonatomic) int tabIndex;
@property (nonatomic, assign)UIViewController *viewController;

//用指定显示区域 与 数据源初始化对象
- (id)initWithFrame:(CGRect)aRect
			   data:(CustomDataGridComponentDataSource *)aDataSource 
		   gridType:(NSString *)aGridType;
-(void)doAction:(int)row;

-(void)layoutSubView:(CGRect)aRect;
-(void)addRightArrow:(UIView*)view;
@end

